<div id="chat-window" class="row zs-chat-window" ng-controller="ChatDetailController">

    <div class="row" ng-show="{{generateHtml == 'true'?false:true}}">
        <div class="col-md-4 col-sm-10 col-sm-offset-1 col-md-offset-4">
            <nav class="text-center" aria-label="Page navigation">
                <ul class="pagination">
                    <li><a ng-click="goToPage(1)">首页</a></li>
                    <li ng-class="{'hidden':currentPage == 1}">
                        <a ng-click="goToPage(currentPage - 1)">
                            <span aria-hidden="true">&laquo;</span>
                        </a>
                    </li>
                    <li ng-repeat="(key,pageIndex) in pageLink" ng-class="{'active':pageIndex == currentPage}">
                        <a ng-click="goToPage(pageIndex)">{{pageIndex}}</a>
                    </li>
                    <li ng-class="{'hidden':currentPage == totalPageCount}">
                        <a ng-click="goToPage(currentPage + 1)">
                            <span aria-hidden="true">&raquo;</span>
                        </a>
                    </li>
                    <li><a ng-click="goToPage(totalPageCount)">尾页</a></li>
                </ul>
            </nav>
        </div>
    </div>

    <div class="row zs-message-wrapper" ng-repeat="(key,message) in chatData">
        <div class="row">
            <p class="zs-message-time" ng-show="{{message.time == ''?false:true }}" >{{message.time}}</p>
        </div>
        <div class="row">
            <div class="col-md-1 col-sm-1 col-xs-1 text-right">
                <div class="row">
                <img ng-show="{{message.owner == 1?'true':'false'}}" width="50" height="50" src="{{otherInfo.headPath}}" alt="">
                <img ng-show="{{message.owner == 1?'false':'true'}}" width="50" height="50" src="resources/empty.png" alt="">
                    </div>
            </div>
            <div class="col-md-10 col-sm-10 col-xs-10 zs-message">
                <div ng-bind-html = "message.content | trustHtml"
                     class="zs-message-content {{message.owner == 0?'pull-right zs-message-content-me':'pull-left zs-message-content-other'}}"
                     ng-click="on_message_click(message)"
                >
                </div>
            </div>
            <div class="col-md-1 col-sm-1 col-xs-1 text-left">
                <div class="row">
                    <img ng-show="{{message.owner == 0?'true':'false'}}" width="50" height="50" src="{{meInfo.headPath}}" alt="">
                    <img ng-show="{{message.owner == 0?'false':'true'}}" width="50" height="50" src="resources/empty.png" alt="">
                </div>
            </div>
        </div>
    </div>

    <div class="row" ng-show="{{generateHtml == 'true'?false:true}}">
        <div class="col-md-4 col-sm-10 col-sm-offset-1 col-md-offset-4">
            <nav class="text-center" aria-label="Page navigation">
                <ul class="pagination">
                    <li><a ng-click="goToPage(1)">首页</a></li>
                    <li ng-class="{'hidden':currentPage == 1}">
                        <a ng-click="goToPage(currentPage - 1)">
                            <span aria-hidden="true">&laquo;</span>
                        </a>
                    </li>
                    <li ng-repeat="(key,pageIndex) in pageLink" ng-class="{'active':pageIndex == currentPage}"><a ng-click="goToPage(pageIndex)">{{pageIndex}}</a></li>
                    <li ng-class="{'hidden':currentPage == totalPageCount}">
                        <a ng-click="goToPage(currentPage + 1)">
                            <span aria-hidden="true">&raquo;</span>
                        </a>
                    </li>
                    <li><a ng-click="goToPage(totalPageCount)">尾页</a></li>
                </ul>
            </nav>
        </div>
    </div>

</div>
